#ifndef DBUSMANAGER_H
#define DBUSMANAGER_H

#include <QObject>
#include <QString>
#include <QtDBus>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QtDebug>

class dBusManager : public QObject
{
    Q_OBJECT

    public :
            dBusManager();

    public slots :
            void activate();
            void desactivate();
            void setAlwaysBusy(bool);
            bool isAlwaysBusy();

    signals :
            //void auxPressed();
            void auxLongPressed();
            void powerPressed();
            void powerLongPressed();
            void idle();
            void showMessage(QString message);


    private :
            QDBusInterface *m_db_input;
            QDBusInterface *m_db_state;
            QDBusInterface *m_db_power;

            QProcess m_panelProcess;

            bool m_activated;
            bool m_alwaysBusy;
            bool m_batteryCharged;
            bool m_keyboardDown;
            bool m_batteryOnCharge;
    private slots :
            void buttonPressed(QString,QString,int);
            void statusChanged(QString);
            void capacityChanged(int);
            void powerStatusChanged(QString);
};


#endif // DBUSMANAGER_H
